--独木难支
local dumunanzhi = fk.CreateSkill {
    name = "mcdh_dumunanzhi",
    tags = {Skill.Compulsory}
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

dumunanzhi:addEffect(fk.Damage,{
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(self) and player == target and data.to and not data.to.dead and data.to ~= player
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        data.to:drawCards(2, self.name)
        if data.to.dead or data.to:isNude() then return end
        local num = #table.filter(room:getAlivePlayers(),function (p)
            return p:distanceTo(player) == 1
        end)
        if num > 0 then
            local cards = room:askForCardsChosen(player, data.to, num, num, "he", self.name)
            room:throwCard(cards, self.name, data.to, player)
        end
    end
})

Fk:loadTranslationTable {
    ["mcdh_dumunanzhi"] = "孤木",
    [":mcdh_dumunanzhi"] = "锁定技，当你对其他角色造成伤害后，你令其摸两张牌，然后弃置其X张牌（X为与你距离为1的角色数）。",
}

return dumunanzhi